package uml.objects;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JFrame;

import uml.view.ClassFormatter_View;
import uml.view.factory.ContainerFactory;

public class ArrowDriver {

	/**
	 * @param args
	 */
	public static void main(String[] args) 
	{
		JFrame window = new JFrame();
		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		window.setSize(800,600);
		window.setVisible(true);
		System.out.println(window.isDisplayable());
		
		ArrowLine l = new ArrowLine();
		l.setColor(Color.black);
		l.addPoint(new AnchorPoint(50 , 50, window.getContentPane()));
		l.addPoint(new AnchorPoint(500 , 50, window.getContentPane()));
		l.addPoint(new AnchorPoint(500 , 500, window.getContentPane()));
		Graphics g = window.getGraphics();
		l.paint(g);
		
		ClassFormatter_View v = new ClassFormatter_View();
		v.setContainer(ContainerFactory.createClassView());
		v.getComponent().setVisible(true);
		window.add(v.getComponent());
		l.addPoint(new AnchorPoint(50,50,v.getContainer()));
		while(true)
			l.paint(g);
	}

}
